QTk - A Mixed Declarative/Procedural Approach for Designing Executable User Interfaces

نویسندگان

  • Donatien Grolaux
  • Peter Van Roy
  • Jean Vanderdonckt
چکیده

When designing executable user interfaces, it is often advantageous to use declarative and procedural approaches together, each when most appropriate: − A declarative approach can be used to define widget types, their initial states, their resize behavior, and how they are nested to form each window. All this information can be represented as a data structure. For example, widgets can be records and the window structure is then simply a nested record. − A procedural approach can be used when its expressive power is needed, i.e., to define most of the UI's dynamic behavior. For example, UI events trigger calls to action procedures and the application can change widget state by invoking handler objects. Both action procedures and handler objects can be embedded in the data structures used by the declarative approach. The QTk tool uses this mixed approach, tightly integrated with a programming language that has extensive support for records and first-class procedures. This permits executable model-based UI design: the UI models are executed at run-time without any compilation. To be precise, each UI model is a record that is transformed at run-time to its QTk specification, which is also a record. We demonstrate the effectiveness of this approach by writing a context-sensitive clock utility, FlexClock, that changes its view at run-time whenever its window is resized. The utility is written in less than 400 lines. This includes full definitions of a calendar widget, an analog clock widget, and 16 views. Each view is defined as a record with three fields. All 16 views including formatting utilities are written in 80 lines total. The mechanism for creating a running UI from these definitions is written in 60 lines. Here is the definition of one view:

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

QTk: An Integrated Model-Based Approach to Designing Executable User Interfaces

QTk is a tool built on top of Tcl/Tk that allows user interface designers to adopt a cost-effective model-based approach for designing executable user interfaces. QTk is based on a descriptive approach that uses a declarative style where appropriate (symbolic records to specify widget types, initial states, and geometry management; procedure values to specify actions), augmented with objects an...

متن کامل

A Design Space for Context-Sensitive User Interfaces

Context-sensitive user interfaces become a very important class of interfaces as they reconfigure their presentation and dialog according to various events generated in a dynamic context of use. Traditional procedural approaches for developing such use interfaces are very expressive, yet expensive to develop, difficult to use and verbose to write. Declarative model-based approaches have recentl...

متن کامل

A Framework for Generating Spatial Configurations in User Interfaces

This paper describes an approach to the problem of designing and implementing visual presentations in direct-manipulative user interfaces. Such presentations are often complex and their construction requires in-depth design knowledge. A framework is proposed that includes declarative models and inference mechanisms, aimed to significantly reduce the demands on the interface developer. Models of...

متن کامل

Declarative Programming of User Interfaces

This paper proposes a declarative description of user interfaces that abstracts from low-level implementation details. In particular, the user interfaces specified in our framework are executable as graphical user interfaces for desktop applications as well as web user interfaces via standard web browsers. Thus, our approach combines the advantages of existing user interface technologies in a f...

متن کامل

Automatic generation of spatial configurations in user interfaces

The usability of graphical user interfaces relies to a large extent on the cognitively plausible visualisation of the application data structures, and in particular, the spatial arrangement of these visual elements. While the popularity of graphical interfaces has increased dramatically in recent years, the necessary design skills have not developed with the same pace. The thesis addresses this...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001